﻿using Sprout.Schedule.Enums;
using System;
using System.Collections.Generic;
using System.Text;

namespace Sprout.Schedule.Dtos
{
    public class TaskInfo
    {
        /// <summary>
        /// 
        ///</summary>
        public long Id { get; set; }
        /// <summary>
        /// 任务类型
        /// </summary>
        public JobTypeEnum JobType { get; set; }
        /// <summary>
        ///任务完整地址
        ///</summary>
        public string JobFullName { get; set; }
        /// <summary>
        ///状态
        ///</summary>
        public TaskStatusEnum Status { get; set; }
        /// <summary>
        ///运行状态
        ///</summary>
        public TaskRunStatusEnum RunStatus { get; set; }
        /// <summary>
        ///任务名称
        ///</summary>
        public string Name { get; set; }
        /// <summary>
        ///cron表达示
        ///</summary>
        public string CronExpression { get; set; }
        /// <summary>
        ///备注
        ///</summary>
        public string Remark { get; set; }
        /// <summary>
        /// 上次运行时间
        /// </summary>
        public DateTime? RunTime { get; set; }
        /// <summary>
        /// 上次运行结束时间
        /// </summary>
        public DateTime? RunEndTime { get; set; }
        /// <summary>
        /// 上次执行的值，用于下次执行的判断依据
        ///</summary>
        public string RunValue { get; set; }
        /// <summary>
        ///参数信息,JSON格式
        ///</summary>
        public string Parameters { get; set; }
        /// <summary>
        /// 运行超时时间（秒）
        /// </summary>
        public int RunTimeoutSeconds { get; set; }
        /// <summary>
        ///是否删除
        ///</summary>
        public bool IsDeleted { get; set; }
        /// <summary>
        ///创建时间
        ///</summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        ///修改时间
        ///</summary>
        public DateTime UpdateTime { get; set; }
    }
}
